package cn.net.yato.picture.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @ClassName Image
 * @Description 图库类
 * @Author yato
 * @Date 2020/2/17 13:10
 * @Version 1.0
 */
@Data
@TableName(value = "image")
public class Image implements Serializable {
    /**
     * 自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private long id;
    /**
     * 图片id 唯一
     */
    @TableField(value = "imgId")
    private String imgId;
    /**
     * 图片名称 唯一
     */
    @TableField(value = "imgName")
    private String imgName;
    /**
     * 图片大小 （KB）
     */
    @TableField(value = "imgSize")
    private double imgSize;
    /**
     * 图片访问路径
     */
    @TableField(value = "imgPath")
    private String imgPath;
    /**
     * 图片服务器路径
     */
    @TableField(value = "imgLocPath")
    private String imgLocPath;
    /**
     * 图片上传者id
     */
    @TableField(value = "imgUploadUserId")
    private String imgUploadUserId;
    /**
     * 图片上传时间
     */
    @TableField(value = "imgUploadDate")
    private Date imgUploadDate;
    /**
     * 图片描述
     */
    @TableField(value = "imgDescribe")
    private String imgDescribe;
    /**
     * 图片浏览次数
     */
    @TableField(value = "imgBrowseCount")
    private long imgBrowseCount;
    /**
     * 图片下载次数
     */
    @TableField(value = "imgDownCount")
    private long imgDownCount;

    /**
     * 图片类型集合
     */
    @TableField(exist = false)
    private List<ImgType> imgTypes = new ArrayList<>();

    public Image() {
    }

    public Image(long id, String imgId, String imgName, double imgSize, String imgPath, String imgLocPath, String imgUploadUserId, Date imgUploadDate, String imgDescribe, long imgBrowseCount, long imgDownCount, List<ImgType> imgTypes) {
        this.id = id;
        this.imgId = imgId;
        this.imgName = imgName;
        this.imgSize = imgSize;
        this.imgPath = imgPath;
        this.imgLocPath = imgLocPath;
        this.imgUploadUserId = imgUploadUserId;
        this.imgUploadDate = imgUploadDate;
        this.imgDescribe = imgDescribe;
        this.imgBrowseCount = imgBrowseCount;
        this.imgDownCount = imgDownCount;
        this.imgTypes = imgTypes;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getImgId() {
        return imgId;
    }

    public void setImgId(String imgId) {
        this.imgId = imgId;
    }

    public String getImgName() {
        return imgName;
    }

    public void setImgName(String imgName) {
        this.imgName = imgName;
    }

    public double getImgSize() {
        return imgSize;
    }

    public void setImgSize(double imgSize) {
        this.imgSize = imgSize;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public String getImgLocPath() {
        return imgLocPath;
    }

    public void setImgLocPath(String imgLocPath) {
        this.imgLocPath = imgLocPath;
    }

    public String getImgUploadUserId() {
        return imgUploadUserId;
    }

    public void setImgUploadUserId(String imgUploadUserId) {
        this.imgUploadUserId = imgUploadUserId;
    }

    public Date getImgUploadDate() {
        return imgUploadDate;
    }

    public void setImgUploadDate(Date imgUploadDate) {
        this.imgUploadDate = imgUploadDate;
    }

    public String getImgDescribe() {
        return imgDescribe;
    }

    public void setImgDescribe(String imgDescribe) {
        this.imgDescribe = imgDescribe;
    }

    public long getImgBrowseCount() {
        return imgBrowseCount;
    }

    public void setImgBrowseCount(long imgBrowseCount) {
        this.imgBrowseCount = imgBrowseCount;
    }

    public long getImgDownCount() {
        return imgDownCount;
    }

    public void setImgDownCount(long imgDownCount) {
        this.imgDownCount = imgDownCount;
    }

    public List<ImgType> getImgTypes() {
        return imgTypes;
    }

    public void setImgTypes(List<ImgType> imgTypes) {
        this.imgTypes = imgTypes;
    }
}
